Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds setters for OS/OSVersion/Architecture #66

Merged
merged 2 commits into from
Oct 15, 2020

Conversation

micahyoung
Copy link
Member

Required to create valid, empty images without FromBaseImage

This will be important for Windows buildpackages in pack (currently draft PR: buildpacks/pack#840), which will not use FromBaseImage

@micahyoung micahyoung marked this pull request as ready for review October 12, 2020 19:01
@micahyoung micahyoung requested a review from a team as a code owner October 12, 2020 19:01
Comment on lines +41 to +43
SetOS(string) error
SetOSVersion(string) error
SetArchitecture(string) error
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually I feel like these options make more sense as options on NewImage. Having constructor options instead of a setter would convey that is not valid to change these values for any image other than an empty image. But I can see how the awkwardness of our existing FromBase option makes that difficult to support without broader changes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, good call. I was also wondering how it will intersect with the needs of #54 which would also need very similar looking flags but to instead filter the FromBaseImage platform.

local/local.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ameyer-pivotal ameyer-pivotal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see @ekcasey's point about setting the OS to something other than the daemon OS. Otherwise 👍

- Keep as a noop setter for consitency remote
- Compare against default value to fail fast

Signed-off-by: Micah Young <[email protected]>
@ekcasey ekcasey merged commit 93c80fa into buildpacks:main Oct 15, 2020
@micahyoung micahyoung deleted the image-os-setters branch October 16, 2020 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants